package com.woniu.supermarket.mapper;

import com.woniu.supermarket.entity.PurchaseDetail;
import com.woniu.supermarket.vo.PurchaseDetailVo;
import com.woniu.supermarket.vo.PurchaseVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PurchaseDetailMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PurchaseDetailVo record);

    PurchaseDetail selectByPrimaryKey(Integer id);

    List<PurchaseDetail> selectAll();

    int updateByPrimaryKey(PurchaseDetail record);

    int deleteBatchPurchaseDetail(int[] ids);

    int deletePurchaseDetailByPurchaseId(Integer purchaseId);

    int insertBatchPurchaseDetail(@Param("purchaseDetailList") List<PurchaseDetailVo> purchaseDetailList);

    List<PurchaseDetailVo> selectAllPurchaseDetailByPurchaseId(Integer id);

    List<PurchaseDetailVo> selectAllPurchaseDetailByPurchaseNumber(String purchaseNumber);
}